package com.qianfeng.openplatform.webmaster.controller;

import com.qianfeng.openplatform.webmaster.entry.MenuNode;
import com.qianfeng.openplatform.webmaster.pojo.Menu;
import com.qianfeng.openplatform.webmaster.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 江江
 * @Date 2020/7/22 15:08
 */
@RestController
public class SystemController {
    @Autowired
    private MenuService menuService;
    @RequestMapping("/side")
    public MenuNode loadMenu(){
        MenuNode node = new MenuNode();
        List<Menu> menuList = menuService.getLeftMenu();
        node.setResult(menuList);
        return node;

    }
}
